package wc.model.screen;

public class Bitmap {
	private int width;
	private int height;
	private int[] pixels;
	
	public Bitmap(int width, int height) {
		this.width = width;
		this.height = height;
		pixels = new int[width * height];
	}
	
	public int getWidth() {
		return width;
	}
	
	public int getHeight() {
		return height;
	}
	
	public int[] getPixels() {
		return pixels;
	}
	
	public int getPixelsByIndex(int index) {
		return pixels[index];
	}
	
	public void setPixels(int index, int value) {
		pixels[index] = value;
	}
	
	public void setPixels(int[] value) {
		pixels = value;
	}
	
	public Bitmap copy() {
		Bitmap value = new Bitmap(width, height);
		value.pixels = this.pixels.clone();
		return value;
	}
}
